
using System.Threading;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Collections.Generic;
namespace com.tc.gateway.tunnel
{
    public class TunnelManager
    {
        static string protocol = "tcp";
        static public TunnelServer getServer(Stream stream)
        {
            if (protocol.Equals("udp"))
                return new MultiTunnelServer(stream);
            else
                return new TcpTunnelServer(stream, (short)8888);
        }
        static public TunnelClient getClient(string ip, short port)
        {
            if (protocol.Equals("udp"))

                return new MultiTunnelClient();

            else

                return new TcpTunnelClient(ip, port);

        }
    }
}